﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>客户资料管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" href="../../../../WebPlugin/jquery-easyui/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="../../../../WebPlugin/jquery-easyui/themes/icon.css"/>
    <script type="text/javascript" src="../../../../WebPlugin/jquery-easyui/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="../../../../WebPlugin/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../../../WebPlugin/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../../../../WebPlugin/jquery-easyui/JQueryCommon.js"></script>
    <script src="../../PageJS/BaseInfo/OwnerManager.js" type="text/javascript"></script>
</head>
<body  class="easyui-layout">
    <div region="west" style="width:350px;padding:0px;" split="true" border="false">      
        <div id="tabRoomShop" class="easyui-tabs" tools="#tab-tools" fit="true">
             <div title="房间" style="overflow:hidden;">
                <div  class="easyui-layout" fit="true">
                    <div region="north"   style="overflow:hidden;padding:2px" border="false">
                         <table>
		                        <tr>
                                    <td><label>管理区:</label></td>
                                   <td><input id="searchArea" class="easyui-combobox"  type="text" name="AreaCode"  style="width:165px"  valueField="AreaCode"  textField="AreaName"  url="../Controller.aspx?controller=RoomController&method=GetCombAreaList"  panelHeight="auto""/></td>
                               </tr>
                               <tr>
                                    <td><label>大楼:</label></td>
                                   <td><input id="searchBuilding" class="easyui-combobox"  type="text" name="BuildingCode"  style="width:165px"  valueField="BuildingCode"  textField="BuildingName"  url ="../Controller.aspx?controller=RoomController&method=GetBuildingFieldList&AreaCode=" panelHeight="auto"/></td>
                               </tr>
                               <tr>
                                    <td><label>房间类型:</label></td>
                                    <td><input id="useType" class="easyui-combobox"  type="text" name="UseType" style="width:165px;" valueField="Code"  textField="Name" url="../Controller.aspx?controller=RoomController&method=GetBaseData&type=1" panelHeight="auto"></input></td>             
                               </tr>
                               <tr>
                                    <td><label>房间号:</label></td>
                                    <td><input id="searchroomId" type="text" name="RoomId"  style="width:160px;"/></td>
                               </tr>
                                <tr>
                                    <td></td>
                                    <td align="left"><input id="btnSearch" type="button" value="查找"  style="width:60px;" onclick="fn_searchroom();"/>
                                      <input id="Button1" type="button" value="重置"  style="width:60px;" onclick="fn_reset();"/>
                                    </td>
                               </tr>
                          </table>
                    </div>	 
                    <div region="center" title="业主信息" >
                        <table id="ownerRoomGrid" class="easyui-datagrid" idField="RoomId" fit="true" pagination="true" border="false">
                            <thead>
                                    <tr>
	                                    <th field="BuildingCode" width="60">大楼</th>
	                                    <th field="RoomNumber" width="80" >房间号</th>
	                                    <th field="Name" width="80" >业主姓名</th>	                              
                                    </tr>
                            </thead>
                       </table>                 		
                    </div>           
                </div>
              </div>
              
              <div  title="门面" style="overflow:hidden;">
                 <div  class="easyui-layout" fit="true">
                    <div region="north"   style="padding:10px; height:80px" border="false">
                         <table>
		                   <tr>
                               <td><label>门面名:</label></td>
                               <td><input id="txtshop"  type="text" name="ShopName" style="width:160px;"></input></td>    
                           </tr>
                            <tr>
                                <td></td>
                                <td align="left"><input id="Button2" type="button" value="查找"  style="width:60px;" onclick="fn_searchshop();"/>
                                </td>
                           </tr>
                          </table>
                    </div>	 
                    <div region="center" title="门面信息">
                      <table id="shoplistGrid" class="easyui-datagrid" idField="RoomId"    style="overflow:hidden;"  pagination="true" border="false" fit="true" >
                            <thead>
                                    <tr>
	                                    <th field="ShopName" width="80" >门面名称</th>
	                                    <th field="OwnerName" width="80" >业主姓名</th>	                              
                                    </tr>
                            </thead>
                        </table>
                   		
                  </div>   
                  </div>        
              </div>
        </div>
	  </div>
    <div region="center" style="overflow:hidden;" fit="true" >
        <table id="ownerTreeGrid" idField="id" treeField="Name" pagination="true"  pageSize="20" fit="true" >
            <thead>
                    <tr>
                        <th field="Name" width="100" >姓名</th>
                        <th field="Sex" width="50" formatter="sexFormatter">性别</th>
                        <th field="RelationType" width="50" formatter="typeFormatter">类别</th>
                        <th field="BirthdayDate" width="100" >生日</th>
                        <th field="HomeTown" width="100" >籍贯</th>
                        <th field="CardType" width="50" formatter="cardFormatter">证件类型</th>
                        <th field="CardNum" width="130" >证件号码</th>
                        <th field="OftenRelaAdress" width="200" >联系地址</th>
                        <th field="QQ" width="100" >QQ</th>
                        <th field="Telephone" width="100" >住宅电话</th>
                        <th field="OftenMobile" width="100" >手机号</th>
                        <th field="Mail" width="100" >邮箱</th>
                        <th field="Memo" width="100" >备注</th>
                    </tr>
            </thead>
        </table>
    </div>
    
</body>
   <%--弹出窗界面--%>    
  <div id="dialog-client"  class="easyui-layout"  icon="icon-save" style="background:#fafafa;padding:10px;width:600px;height:500px;">
      	      
     <div region="center" style="overflow:hidden;" fit="true" >    
      <div class="easyui-layout" fit="true"  style="overflow:hidden;">  
            <div region="north" style="overflow:hidden; height:300px"  border="false">  
                <form id="clientform" method="post" style="padding:10px 10px 10px 20px;" >         
                     <table>
		                <tr>
                            <td><label>姓名:</label></td>
                            <td><input id="frompername" class="easyui-validatebox" type="text" name="Name" required="true" style="width:139px;"></input>
                            <label>性别:</label>
                            <input  id="frompersex" class="easyui-combobox" required="true" type="text" name="Sex" required="true" style="width:70px;"  valueField="Id"  textField="Name" url="../Controller.aspx?controller=OwnerController&method=GetSexData" panelHeight="auto"/>
                            </td>
                       </tr>
                       <tr>
                            <td><label>出生日期:</label></td>
                            <td><input  id="fromperbirth" class="easyui-datebox" name="BirthdayDate" required="true"  style="width:145px;"></input>
                            <label>类型:</label>
                            <input id="RelationType" class="easyui-combobox" required="true" type="text" name="RelationType"  style="width:70px;"  valueField="Code"  textField="Name" url="../Controller.aspx?controller=RoomController&method=GetBaseData&type=6"  panelHeight="auto"/>
                            </td>
                       </tr>                     
                       <tr>
                            <td><label>证件类型:</label></td>
                            <td>
                                <input  id="frompercardtype" class="easyui-combobox"  type="text" type="text" name="CardType"  style="width:50px;" valueField="Code"  textField="Name" url="../Controller.aspx?controller=RoomController&method=GetBaseData&type=7" panelHeight="auto"/>
                                <label>号码:</label>
                                <input  id="frompercard" type="text" name="CardNum"  style="width:158px;"/>
                            </td>
                       </tr>                      
                       <tr>
                            <td><label>联系电话:</label></td>
                            <td>
                                <input  id="fromperphone" class="easyui-numberbox" type="text" name="Telephone" style="width:100px;"/>
                                <label>手机:</label>
                                 <input  id="frompermobile" class="easyui-numberbox" type="text" name="OftenMobile"  style="width:103px;"/>
                            </td>
                       </tr>
                       <tr>
                             <td>
                              <label>QQ:</label></td>
                              <td><input  id="fromperqq"  class="easyui-numberbox" type="text" name="QQ"   style="width:80px;"/>
                              <label>邮箱:</label>
                              <input  id="frompermail" type="text" name="Mail"  style="width:123px;" />
                             </td>
                       </tr>                       
                        <tr>
                            <td><label>籍贯:</label></td>
                            <td><input  id="fromperhometown" type="text" name="HomeTown" style="width:250px;"/></td>
                       </tr>
                        <tr>
                            <td><label>联系地址:</label></td>
                            <td><input  id="fromperadress" type="text" name="OftenRelaAdress"  style="width:250px;"/></td>
                       </tr> 
                       <tr>
                            <td><label>备注:</label></td>
                              <td colspan=3><textarea   id="frompermemo" name="Memo" style="width: 250px; height: 58px"></textarea></td>
                       </tr>
                       </table>      
                        <input id="OwnerId" type="hidden" name="OwnerId" ></input> 
                        <input id="POwnerId" type="hidden" name="POwnerId" ></input>      
                        <input id="RoomId" type="hidden" name="RoomId" ></input>  
                        <input id="formaddtype" type="hidden" name="addtype" />
                        <input id="formedittype" type="hidden" name="edittype" />
                    </form>
              </div>
              
               <div region="center" title="业主成员信息" fit="true">
               	    <div id="tool">
							<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="javascript:$('#clientGrid').datagrid('reload');">刷新</a>
							<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="fn_addownerfield();">添加</a>
							<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="fn_delownwerfield();">删除</a>
				   </div>
                    <table id="clientGrid"  toolbar="#tool" class="easyui-datagrid" border="false"  singleSelect="true">
                        <thead>
                                <tr>
	                                <th field="Name" width="100">姓名</th>
	                                <th field="Sex" width="100" >性别</th>
	                                <th field="RelationType" width="100" >客户类型</th>	                              
                                </tr>
                        </thead>
                    </table>
               </div>
           
           </div>
    </div>
</div>

<div id="dialog-search" icon="icon-search" style="background:#fafafa;padding:10px;width:350px;height:200px;">
    <form id="searchform" method="post">
      <table>
        <tr>
            <td><label>姓名:</label></td>
            <td><input id="searchname" type="text"  name="PersonName"  style="width:205px"/></td>
           
        </tr>
        <tr>
            <td><label>身份证:</label></td>
            <td><input id="searchIdcard"  type="text" name="Cardnum"  style="width:205px" /></td>
        </tr>
		<tr>
             <td><label>手机号:</label></td>
             <td><input id="searchMobile"  type="text" name="Mobile" style="width:205px;"></input></td>             
       </tr>
     
       </table>
    </form>
</div>

</html>
